import React from 'react'
import {axiosGet} from '../../axios'
import {url,highquality} from '../../api'
import SongList from '../common/song-list'

export default class playlistRecommended extends React.Component {
    constructor(props){
        super(props)
        this.state={
            songList:[]
        }
    }
    componentDidMount(){
        this.getSongList()
    }
    //  获取推荐歌单
    getSongList(){
        axiosGet(url,highquality,'limit=10').then(data=>{
            this.setState({
                songList:data.playlists
            })
          }
      )
    }
    render(){
        return(
            <div className='playlist-recommended' style={{marginTop:'50px'}}>
                <h3 style={{fontWeight:700}}>推荐歌单</h3>
                <SongList list={this.state.songList} ></SongList>
            </div>
        )
    }
}